{% extends "front/front_base.html" %}

{% block title %}
    发布帖子 - 汇智论坛
{% endblock %}

{% block head %}
    <link href="{{ url_for("static", filename="front/css/wangeditorlatest_dist_css_style.css") }}" rel="stylesheet">
    <link href="{{ url_for("static", filename="front/css/wangEditor.css") }}" rel="stylesheet">
    <script src="{{ url_for('static', filename='front/js/public_post.js') }}"></script>
    <script src="{{ url_for('static', filename='front/js/wangeditor_latest_dist_index.js') }}"></script>
{% endblock %}

{% block body %}
    <h1 style="text-align: center; padding: 20px;">发布帖子</h1>
    <form action="" method="post">
        <div class="form-group">
            <div class="input-group">
                <span class="input-group-addon">标题</span>
                <input type="text" class="form-control" name="title">
            </div>
        </div>
        <div class="form-group">
            <div class="input-group">
                <span class="input-group-addon">板块</span>
                <select name="board_id" class="form-control">
                    {% for board in boards %}
                        <option value="{{ board.id }}">{{ board.name }}</option>
                    {% endfor %}
                </select>
            </div>
        </div>
        <div class="form-group">
            <div id="editor—wrapper">
                <div id="toolbar-container"><!-- 工具栏 --></div>
                <div id="editor-container"><!-- 编辑器 --></div>
            </div>
        </div>
        <div class="form-group">
            <button class="btn btn-danger" id="submit-btn">发布帖子</button>
        </div>
    </form>
{% endblock %}